<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>未来可期任务平台-找回密码</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/common.css" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/Swiper/4.2.2/css/swiper.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/animate.css/3.5.2/animate.min.css">
    <link href="https://img.qianxiaoduan.com/element-ui/2.3.4/theme-chalk/index.css" rel="stylesheet">
    <link rel="stylesheet" href="https://page.qianxiaoduan.com/css/style-red.css">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_2808129_awgy92qb9k7.css">
    <script type="text/javascript" src="js/jquery.min.js" ></script>
    <script type="text/javascript" src="js/common.js" ></script>
</head>
<body>
<div class="Theme-header-Style1 header-container " style="height: 80px">
    <div class="container">
        <div class="row">
            <div class="col">
                <div class="logo">
                    <a href="">
                        <img src="img/logo.png" alt="">
                    </a>
                </div>
                <div>
                    <img src="img/log1.png">
                </div>
            </div>
        </div>
    </div>
</div>

<div class="wrap login_wrap" style="height: 800px">
    <div class="content">

        <div class="logo"></div>

        <div class="login_box">

            <div class="login_form">
                <div class="login_title">
                    找回密码
                </div>
                <form action="" method="post">
                    <div class="form_text_ipt">
                        <input id="email" name="email" type="email" placeholder="邮箱">
                    </div>
                    <div class="ececk_warning"><span>数据不能为空</span></div>
                    <div class="form_text_ipt" style="border:none;height: 10px">
                        <a id="jsCode" style="font-size: 10px;font-weight: bold;color: red">获取验证码</a>
                    </div>
                    <div class="form_text_ipt">
                        <input id="psd" name="password" type="password" placeholder="输入新密码">
                    </div>
                    <div class="ececk_warning"><span>数据不能为空</span></div>
                    <div class="form_text_ipt">
                        <input id="code" name="code" type="text" placeholder="验证码">
                    </div>
                    <div class="ececk_warning"><span>数据不能为空</span></div>

                    <div class="form_btn">
                        <button id="to_register" type="button">修改</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--返回顶部-->
<div class="Theme-returnTOP">
    <ul>
        <li data-toggle="modal" data-target="#QRcode">
            <i class="iconfont icon-weixin">
            </i>
        </li>
        <li>
            <a href="" target="_blank" rel="noopener noreferrer nofollow">
                <i class="iconfont icon-weibo">
                </i>
            </a>
        </li>
        <li>
            <a href="" target="_blank" rel="noopener noreferrer nofollow">
                <i class="iconfont icon-qq">
                </i>
            </a>
        </li>
        <li class="active returnTop">
            <i class="iconfont icon-shang">
            </i>
        </li>
    </ul>
</div>
<div id="QRcode" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" class="modal fade">
    <div class="modal-dialog Theme-QR-code">
        <div class="modal-content">
            <img src="https://img.qianxiaoduan.com/muban/QR-code.jpg" alt="">
            <p>
                扫描二维码关注我们
            </p>
        </div>
    </div>
</div>
<!--返回顶部-->
<div class="Theme-footer-1">
    <div class="container">
        <div class="row">
            <div class="col">
                <h3>
                    未来可期有限公司
                </h3>
            </div>
        </div>
        <div class="row">
            <div class="col-md-4">
                <p>
                    未来可期有限公司 COPYRIGHT (©) 2022
                    <br>
                    公司地址：四川省成都市武侯区
                    <br>
                    联系电话：0021-93123
                    <br>
                    邮箱：kaix.wang@dhcca.com
                </p>
            </div>
            <div class="col">
                <ul>
                    <li>
                        <a href="">
                            网站首页
                        </a>
                    </li>
                    <li>
                        <a href="">
                            招商代理加盟
                        </a>
                    </li>
                    <li>
                        <a href="">
                            产品中心
                        </a>
                    </li>
                    <li>
                        <a href="">
                            新闻百科
                        </a>
                    </li>
                </ul>
            </div>
            <div class="col">
                <ul>
                    <li>
                        招商代理
                    </li>
                    <li>
                        新闻资讯
                    </li>
                    <li>
                        关于我们
                    </li>
                    <li>
                        联系我们
                    </li>
                </ul>
            </div>
            <div class="col QR-code">
                <img src="https://img.qianxiaoduan.com/muban/QR-code.jpg" alt="">
                <p>
                    联系我们
                </p>
            </div>
        </div>
    </div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/Swiper/4.2.2/js/swiper.min.js"></script>
<script src="https://cdn.bootcss.com/wow/1.1.2/wow.min.js"></script>
<script src="https://page.qianxiaoduan.com/js/script.js"></script>
<script src="js/jquery.min.js"></script>
<script>
    $("#to_register").click(function () {
        let psd=$("#psd").val();
        let email=$("#email").val();
        let code=$("#code").val();
        $.ajax({
            url:"user/forgetPsd",
            datatype:"json",
            data:{"psd":psd,"email":email,"code":code},
            success:function (res) {
                if(res=="验证码不正确"){
                    alert("验证码不正确");
                    return ;
                }
                return window.location.href="login.html";
            }
        })
    });

    $("#jsCode").click(function () {
        let email=$("#email").val();
        let times=60;
        let timer=setInterval(function () {
            $("#jsCode").text(times+"s");
            times--;
            if(times<=0){
                $("#jsCode").text("重新发送");
                clearInterval(timer)
            }
        },1000);
        $.ajax({
            url:"email/sendEmail",
            type:"post",
            datatype:"json",
            data:{"e":email},
            success(res){
                if(res.code==200){
                    $("#jsCode").text("发送成功");
                    clearInterval(timer);
                }
            }
        })
    })
</script>
</html>